// See the Electron documentation for details on how to use preload scripts:
// https://www.electronjs.org/docs/latest/tutorial/process-model#preload-scripts
// preload.js
const { contextBridge, ipcRenderer } = require('electron');

///
contextBridge.exposeInMainWorld('myAPI', {
  version: process.version,
  deskimg(path) {
    return ipcRenderer.invoke('setup_desktop', path);
  },
  toBrowseFiles() {
    return ipcRenderer.invoke('browse-files');
  }
})